package com.ruoyi.project.jiaqin.reportquote.service.impl;

import java.util.List;
import java.util.UUID;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.project.jiaqin.reportquote.mapper.ReportQuoteMapper;
import com.ruoyi.project.jiaqin.reportquote.domain.ReportQuote;
import com.ruoyi.project.jiaqin.reportquote.service.IReportQuoteService;
import com.ruoyi.common.utils.text.Convert;

/**
 * 举报求购Service业务层处理
 *
 * @author admin
 * @date 2020-12-31
 */
@Service
public class ReportQuoteServiceImpl implements IReportQuoteService
{
    @Autowired
    private ReportQuoteMapper reportQuoteMapper;

    /**
     * 查询举报求购
     *
     * @param id 举报求购ID
     * @return 举报求购
     */
    @Override
    public ReportQuote selectReportQuoteById(String id)
    {
        return reportQuoteMapper.selectReportQuoteById(id);
    }

    /**
     * 查询举报求购列表
     *
     * @param reportQuote 举报求购
     * @return 举报求购
     */
    @Override
    public List<ReportQuote> selectReportQuoteList(ReportQuote reportQuote)
    {
        return reportQuoteMapper.selectReportQuoteList(reportQuote);
    }

    /**
     * 新增举报求购
     *
     * @param reportQuote 举报求购
     * @return 结果
     */
    @Override
    public int insertReportQuote(ReportQuote reportQuote)
    {
        reportQuote.setId(UUID.randomUUID().toString().replace("-",""));
        return reportQuoteMapper.insertReportQuote(reportQuote);
    }

    /**
     * 修改举报求购
     *
     * @param reportQuote 举报求购
     * @return 结果
     */
    @Override
    public int updateReportQuote(ReportQuote reportQuote)
    {
        return reportQuoteMapper.updateReportQuote(reportQuote);
    }

    /**
     * 删除举报求购对象
     *
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteReportQuoteByIds(String ids)
    {
        return reportQuoteMapper.deleteReportQuoteByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除举报求购信息
     *
     * @param id 举报求购ID
     * @return 结果
     */
    @Override
    public int deleteReportQuoteById(String id)
    {
        return reportQuoteMapper.deleteReportQuoteById(id);
    }
}
